<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', 'IndexController@index');

Route::get('/user-group', 'UserGroupController@index')->name('list_user_group');
Route::get('/user-group/create', 'UserGroupController@create')->name('create_user_group');
Route::post('/user-group/create', 'UserGroupController@store');
Route::get('/user-group/edit/{id}', 'UserGroupController@edit');
Route::post('/user-group/edit/{id}', 'UserGroupController@update');
Route::delete('/user-group/destroy/{id}', 'UserGroupController@destroy')->name('destroy_user_group');

Auth::routes();

Route::get('/home', 'HomeController@index')->name('home');

Route::get('/user', 'UserController@index')->middleware('auth');

Route::get('/store', 'StoreController@index');
Route::get('/store/create', 'StoreController@create')->middleware('auth');
Route::post('/store/create', 'StoreController@store')->middleware('auth');
Route::get('/store/{id}', 'StoreController@show')->where('id', '\d+')->name('show_store');

Route::get('/goods-category/create', 'GoodsCategoryController@create');
Route::post('/goods-category/create', 'GoodsCategoryController@store');
